from pyecharts import options as opts
from pyecharts.charts import Map

def base_map_china(x, y1, title,legend):
    c = (
        Map()
            .add(legend, [list(z) for z in zip(x, y1)], "china")
            .set_global_opts(
            title_opts=opts.TitleOpts(title=title),
            visualmap_opts=opts.VisualMapOpts(max_=100, is_piecewise=True),
        )

    )
    return c